﻿package com.adsame.adapters
{
	import com.adsame.exceptions.*;

	public class AsamXml2ObjectAdapter
	{
		public static function parse(input : XML) : Object
		{
			var reval : Object = { ad_type : "Banner" };
			var length : Number = input.children().length();
			for (var i = 0; i < length; i++)
			{
				var key = input.children()[i].name();
				var value = input.children()[i].children()[0];
				reval[key] = value;
			}
			return reval;
		}
	}
}
